<<<<<<< HEAD
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Seminar extends CI_Controller {
	
	//签到：每天登陆签到获得1积分。
	function signin(){
		$ret = array(
			'msg' => '',
			'url' => '',
		);
		
		if($this->session->userdata('rsh_user') == false){//如果未登录就跳到登录页面
			$ret['msg'] = '请先登录';
			$ret['url'] = '/login.html';
			echo json_encode($ret);exit;
		}
				
		$user = $this->session->userdata('rsh_user');
		
		$this->load->model('Credit_model', 'credit');
		$res = $this->credit->give_login_credit($user['user_id']);
		if($res == 2){
			$ret['msg'] = '今天已经签过到了，明天继续哦。';
			echo json_encode($ret);exit;
		}else{
			$ret['msg'] = '签到成功';
			echo json_encode($ret);exit;
		}
		
	}

	
=======
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Seminar extends CI_Controller {
    
	//签到：每天登陆签到获得1积分。
	function signin(){
		$ret = array(
			'msg' => '',
			'url' => '',
		);
		
		if($this->session->userdata('rsh_user') == false){//如果未登录就跳到登录页面
			$ret['msg'] = '请先登录';
			$ret['url'] = '/login.html';
			echo json_encode($ret);exit;
		}
				
		$user = $this->session->userdata('rsh_user');
		
		$this->load->model('Credit_model', 'credit');
		$res = $this->credit->give_login_credit($user['user_id']);
		if($res == 2){
			$ret['msg'] = '今天已经签过到了，明天继续哦。';
			echo json_encode($ret);exit;
		}else{
			$ret['msg'] = '签到成功';
			echo json_encode($ret);exit;
		}
		
	}

	
>>>>>>> d47623b610d79a4eeb489500830c00d70933f414
}